package cn.sofwin.day0203.homework;

import java.util.Scanner;

public class H2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入一个字符串：");
        String s = sc.next();
        System.out.print("请输入要查找的字符：");
        String c = sc.next();
        int num = 0;

        for (int i = 0; i < s.length(); i++) {
            if (c.charAt(0) == s.charAt(i)){
                num++;
            }
        }

        System.out.println(s + "中包含" + num + "个" + c);
    }
}
